import React from 'react'
import { useSearchParams } from 'react-router'

export default function Detail() {
  const [search, setSearch] = useSearchParams();
  return (
    <ul>  
        <li>
          <button onClick={()=>setSearch('id=008&title=哈哈&content=嘻嘻')}>点我更新一下收到的search参数</button>
        </li>
        <li>{search.get('id')}</li>
        <li>{search.get('title')}</li>
        <li>{search.get('content')}</li>
    </ul>
  )
}
